CFLAGS =  -Wall -fpic -coverage -lm -std=c99

default: unittestresultsRF.out

unittestresultsRF.out: unittest1.c unittest2.c unittest3.c unittest4.c dominion.c rngs.c

	 echo "Erik Lawing CS362 Teammate Ray Foote Tests:" > unittestresultsRF.out
	 echo " " >> unittestresultsRF.out
	 echo "Result for running updateCoins tests:" >> unittestresultsRF.out
	 echo "unittest1.c:" >> unittestresultsRF.out
	 gcc -o unittest1 dominion.c unittest1.c rngs.c $(CFLAGS)
	 ./unittest1 >> unittestresultsRF.out
		
	 echo " " >>unittestresultsRF.out
	 echo "Result for running isGameOver tests:" >> unittestresultsRF.out
	 echo "unittest2.c:" >> unittestresultsRF.out
	 gcc -o unittest2 dominion.c unittest2.c rngs.c $(CFLAGS)
	 ./unittest2 >> unittestresultsRF.out
		
	 echo " " >> unittestresultsRF.out
	 echo "Result for running scoreFor tests:" >> unittestresultsRF.out
	 echo "unittest3.c:" >> unittestresultsRF.out
	 gcc -o unittest3 dominion.c unittest3.c rngs.c $(CFLAGS)
	 ./unittest3 >> unittestresultsRF.out
		
	 echo " " >> unittestresultsRF.out
	 echo "Result for running getWinners tests:" >> unittestresultsRF.out
	 echo "unittest4.c:" >> unittestresultsRF.out
	 gcc -o unittest4 dominion.c unittest4.c rngs.c $(CFLAGS)
	 ./unittest4 >> unittestresultsRF.out	
	 
	 echo " " >> unittestresultsRF.out
	 echo "Result for running mineCard tests:" >> unittestresultsRF.out
	 echo "cardtest1RF.c:" >> unittestresultsRF.out
	 gcc -o cardtest1RF dominion.c cardtest1RF.c rngs.c $(CFLAGS)
	 ./cardtest1RF >> unittestresultsRF.out

	 echo " " >> unittestresultsRF.out
	 echo "Result for running mineCard tests:" >> unittestresultsRF.out
	 echo "cardtest2RF.c:" >> unittestresultsRF.out
	 gcc -o cardtest2RF dominion.c cardtest2RF.c rngs.c $(CFLAGS)
	 ./cardtest2RF >> unittestresultsRF.out	 
		 
	 echo " " >> unittestresultsRF.out
	 echo "Result for running minionCard tests:" >> unittestresultsRF.out
	 echo "cardtest5RF.c:" >> unittestresultsRF.out
	 gcc -o cardtest5RF dominion.c cardtest5RF.c rngs.c $(CFLAGS)
	 ./cardtest5RF >> unittestresultsRF.out	
		
			
clean:
	rm unittestresultsRF.out

cleanall: 
	rm unittestresultsRF.out unittest1.exe unittest2.exe unittest3.exe unittest4.exe *.gcda *.gcno
